package com.lagou.goods.service.impl;

import Com.lagou.common.pojo.Goods;
import com.lagou.goods.mapper.GoodsMapper;
import com.lagou.goods.service.GoodsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

@Service
public class GoodsServiceImpl implements GoodsService {

    @Autowired
    private GoodsMapper goodsMapper;

    @Override
    public Goods queryById(Integer id) {
        return goodsMapper.selectById(id);
    }

    @Override
    public void delById(Integer id) {
        goodsMapper.deleteById(id);
    }

    @Override
    public int updateByPrimaryKey(Goods goods) {
        return goodsMapper.updateById(goods);
    }


}
